import tui from '../../../common/httpRequest'
Page({
  data: {
    stepList: [{
      name: "preface",
      state: 1,
      stateText: "",
      desc: ["计划前三套模板：新闻、商城、聊天。完成后再逐步追加，敬请期待！"],
      page: "/pages/template/news/index/index"
    }, {
      name: "新闻模板",
      state: 1,
      stateText: "（100%）",
      desc: ["新闻模板包含：新闻列表，新闻详情，评论等"],
      page: "/pages/template/news/index/index"
    }, {
      name: "聊天模板",
      state: 1,
      stateText: "（100%）",
      desc: ["聊天模板包含：消息列表，好友列表，聊天界面等"],
      page: "/pages/template/chat/msgList/msgList"
    }, {
      name: "商城模板",
      state: 1,
      stateText: "（进度100%）",
      desc: ["商城模板包含：商品列表，商品搜索，商品详情，购物车，结算页面，我的订单等"],
      page: "/pages/template/mall/mall/mall"
    }, {
      name: "签到模板",
      state: 1,
      stateText: "（进度100%）",
      desc: ["点star获取模板，详细获取方式查看V1.5.2更新日志"],
      page: "/pages/common/log/log"
    }, {
      name: "多语言模板",
      state: 1,
      stateText: "（进度100%）",
      desc: ["该模板非会员仅供参考学习，源码地址查看V1.5.2更新日志"],
      page: "/pages/common/log/log"
    }, {
      name: "咖啡点单模板",
      state: 1,
      stateText: "（进度100%）",
      desc: ["简单的点单模板，类似weStoreCafe，该模板为付费模板不开源【￥100】，会员2折优惠。预览程序联系QQ：3168647172。"],
      page: "/pages/common/log/log"
    }, {
      name: "订餐",
      state: 0,
      stateText: "（进度100%）",
      desc: ["订餐模板：列表，评价，购物车，订单，我的等。该模板为付费模板不开源，会员9折优惠。V1.6.0之后开放售卖"],
      page: ""
    }, {
      name: "短视频",
      state: 0,
      stateText: "（进度100%）",
      desc: ["短视频播放，类似抖音视频模板。该模板为付费模板不开源，会员9折优惠。V1.6.0之后开放售卖"],
      page: ""
    }, {
      name: "其它模板",
      state: 0,
      stateText: "",
      desc: ["更多内容敬请期待！"],
      page: "news"
    }]
  },
  template: function(e) {
    let index = e.currentTarget.dataset.index;
    let state = this.data.stepList[index].state;
    let page = this.data.stepList[index].page;
    if (state == 1 || index == 3) {
      tui.href(page)
    } else {
      tui.toast("功能暂未开放~")
    }
  },
  currentStep: function() {
    tui.toast("此版本暂不开源，敬请期待！")
  }
})